<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title><?= $Task->name ?></title>
    <style>
        #count_down {
            width: 3rem;
            height: 3rem;
            line-height: 3rem;
            background-color: #DDB65A;
            position: absolute;
            top: 1rem;
            right: 1rem;
            border-radius: 50%;
            text-align: center;
            word-wrap: break-word;
            word-break: break-all;
            overflow: hidden;
        }
    </style>
</head>
<body>

<img src="<?= $Task->url ?>" alt="" width="100%" height="100%">
<div id="count_down">
    <span style="color:white" id="timeNumber">15</span>
    <span style="color:white">秒</span>
</div>
</body>
<?= \yii\helpers\Html::jsFile('@web/static/js/jquery-3.5.1.min.js') ?>
<script>
    $(function () {
        timer = setInterval(function () {
            var number = $("#timeNumber").html();
            if (number > 0) {
                $("#timeNumber").html(number - 1);
            } else {
                clearInterval(timer);
                alert('本任务已完成');
            }
        }, 1000);
    });

</script>
</html>

